Dual ensemble system for polyp segmentation with submodels adaptive selection ensemble

Colonoscopy is one of the main methods to detect colon polyps, and its detection is widely used to prevent and diagnose colon cancer. With the rapid development of computer vision, deep learning-based semantic segmentation methods for colon polyps have been widely researched. However, the accuracy and stability of some methods in colon polyp segmentation tasks show potential for further improvement. In addition, the issue of selecting appropriate sub-models in ensemble learning for the colon polyp segmentation task still needs to be explored. In order to solve the above problems, we first implement the utilization of multi-complementary high-level semantic features through the Multi-Head Control Ensemble. Then, to solve the sub-model selection problem in training, we propose SDBH-PSO Ensemble for sub-model selection and optimization of ensemble weights for different datasets. The experiments were conducted on the public datasets CVC-ClinicDB, Kvasir, CVC-ColonDB, ETIS-LaribPolypDB and PolypGen. The results show that the DET-Former, constructed based on the Multi-Head Control Ensemble and the SDBH-PSO Ensemble, consistently provides improved accuracy across different datasets. Among them, the Multi-Head Control Ensemble demonstrated superior feature fusion capability in the experiments, and the SDBH-PSO Ensemble demonstrated excellent sub-model selection capability. The sub-model selection capabilities of the SDBH-PSO Ensemble will continue to have significant reference value and practical utility as deep learning networks evolve.

is anticipated to both enhance and stabilize performance.However, variability among polyps, coupled with the risk of networks converging to a local optimum during training, may result in a network that adversely affects the effectiveness of the ensemble at the end of training.The proactive identification and removal of such a network before the conclusion of training represent a challenge.A review article points out that generalisability studies are very limited in medical image analysis 21 .To solve the above problems, we propose a generalisability ensemble learning strategy that adaptively selects the most suitable network for the ensemble for different datasets, thus stabilizing the output of high-performance segmentation results.
The main contributions of this paper are as follows: (1) In order to maximize the use of complementary features, we propose Multi-Head Control Ensemble (MHC Ensemble), which can effectively supervise the network and output high-precision segmentation results.(2) In order to achieve stable and high-performance segmentation on discrepant data, we propose an improved Particle Swarm Optimization algorithm for optimizing sub-model weights in ensemble learning.And based on this, we propose a strategy SDBH-PSO Ensemble that can perform adaptive selection of sub-models under different datasets.

Ensemble learning
Ensemble learning methods are broadly categorized into: bagging, boosting, and stacking 22 .Bagging ensemble improves accuracy by training a single network with multiple copies of the dataset 23 .Boosting ensemble optimizes the ensemble results by assigning greater weights to the erroneous copies on top of the bagging ensemble by assigning greater weights to the erroneous copies to optimize the integration results 24 .Combining multiple models helps to improve and stabilize the results 25 .Stacking ensemble's approach of integrating multiple networks as sub-models can provide strong robustness 26 .Stacking ensemble and ensemble multi-output is expected to solve the task of colon polyp segmentation, which is difficult for a single network.For the sake of simplicity, we will refer to "ensemble multi-output" as "ensemble" elsewhere in this paper.Kang et al 27 .used ensemble learning to ensemble segmentation results from Mask R-CNN networks using ResNet50 and ResNet101 as the backbone.Thanh et al 28 .used ensemble learning to ensemble UNet segmentation results from EfficientNet B4 and EfficientNet B5.Nanni et al 29 .used the PvTv2 segmentation ensemble on other tasks and achieved excellent segmentation results.The sub-models used for the ensemble have changed as the model performance has improved.A review article on ensemble learning points out that a major challenge in deep ensemble learning is model selection for building the ensemble architecture 30 .
In the model selection problem, Zhang et al 31 .used neighborhood mutual information to select the models involved in the ensemble on carbon emission prediction.Djellali et al 32 .selected the models involved in the ensemble in a data mining task based on k-fold cross-validation.Both of the above methods perform sub-model selection at the end of training.Birman et al 33 .used reinforcement learning for sub-model selection during training in malware detection tasks.Labeling for colon polyp segmentation is more expensive, which limits the application of reinforcement learning in this area.To explore the application of model selection to colon polyp segmentation, we propose the SDBH-PSO Ensemble.

Ensemble learning with improved PSO optimization
The most critical aspect of the ensemble is the optimization of the ensemble weights and the selection of submodels, and the Particle Swarm Optimization (PSO) algorithm 34 is commonly used for the optimization of the ensemble weights 35 .PSO algorithms have been used to solve a variety of mathematical, engineering, design, network, robotics, and image processing optimization problems 36 .The solution in the PSO algorithm is represented as a particle, which holds a position vector and a velocity vector.PSO searches for the optimal solution by iteration.In each iteration, the velocity v id (t) of each particle is updated based on its previous optimal position P pd (t) , the current optimal position P gd (t) of all particles, random numbers r 1 and r 2 in [0, 1], adjustable iner- tia parameter ω , and adjustable learning parameter c 1 and c 2 , while the position x id (t) is varied as the velocity changes, as defined in Eqs.(1) and Eqs.(2).
The PSO algorithm is considered to continue to be dynamic in interdisciplinary research in the future 37 .In recent years, Gu et al 38 .proposed a resampling PSO algorithm for optimizing the scheduling of multi-star, large-area target observations.Subsequently, Song et al 39 .proposed a large-scale nonconvex joint optimization method based on PSO in order to solve the active control problem of wind farm layout and turbine yaw.Fontes et al 40 .proposed an improved PSO algorithm based on the job shop scheduling problem of transportation resources to be solved.Similarly, Qian et al 41 .proposed an improved PSO algorithm, which successfully realized the intelligent selection of the piston sealing groove for the designed domestic cylinder.Du et al 42 .proposed an improved PSO algorithm for ordered charging strategy, which can reduce the charging cost and peak variance of electric vehicles.Thus, on the problems that can be optimized by PSO algorithms, designing and improving PSO algorithms based on the problem to be solved or optimized is expected to solve the problem in a better way.

Image segmentation on colon polyps
On the task of semantic segmentation of colon polyps, this paper focuses on realizing high-precision and stable segmentation of polyps by building branches and feature fusion, and the relevant state of the art in this regard is as follows.
On branch building, Guo et al 43 .proposed a two-branch approach called ThresholdNet to collaborate segmentation and threshold learning in alternative training strategies.Fang et al 44 .proposed a new boundary-sensitive loss to model the interdependence between region branches and boundary branches.In order to better extracte the detail information, Zhang WC et al 45 .used to capture the local appearance details through the dual branch structure of Transformer and CNN.Chen et al 46 .built a depth feature extraction branch and depth bootstrapping for extracting the depth information between pixels.Wang et al 47 .built a new anchor-free instance segmentation framework by performing object detection branching for classification and localization with mask generation branching for generating instance-level masks.Fan et al 48 .achieved a more stable training process in federated learning by building a multi-branch network.
For feature fusion, Huang et al 49 .re-weighted encoder features in space and channel to enhance key features for segmentation task.To enhance the features on the boundary, Zhou et al 50 .merged the boundary information into the segmentation network to generate finer segmentation maps.Liu et al 51 .achieved adaptive feature fusion and selection for the network by channel attention.In addition, Chen et al 52 .utilized rich global context information to refine the fused features for informative feature representation.Patel et al 53 .improved the quality of features layer by layer, which in turn enhanced the final feature representation.Wang et al 54 .suggested that the region around the polyp has more detailed features that facilitate polyp segmentation.

Method Overview
In order to fuse complementary features and perform stable high-performance segmentation on the disparate colon polyp dataset, we built the Dual Ensemble System, as shown in Fig. 2.Among them, in order to provide complementary features, we built Three-branch Architecture, which fuses complementary features through MHC Ensemble.In addition, in order to achieve stable and high-precision segmentation on different datasets, (1) v id (t + 1) = ωv id (t) + c 1 r 1 (P pd (t) − x id (t)) + c 2 r 2 (P gd (t) − x id (t)) (2) www.nature.com/scientificreports/we choose FCB-Former and ESFPNet, which have complementary phenomena in the output results, and also take into account that there are differences in the adaptability of different datasets to the optimal network depth.The sub-models selected for the SDBH-PSO Ensemble range from sub-model 1 to sub-model 6 and include the following: Treble-Former-L(MiT-B4, PvTv2-B4), Treble-Former-S(MiT-B2, PvTv2-B2), FCB-Former-L(PvTv2-B4), FCB-Former-S(PvTv2-B2), ESFPNet-L(MiT-B4), ESFPNet-S(MiT-B2).Finally, the best real-time ensemble model and the best sub-model optimized by SDBH-PSO are again subjected to final ensemble.In addition, DET-Former is an ensemble structure that allows segmentation across multiple devices.It has an FPS of 3.9 for single-image input.

Three-branch architecture
Mix Transformer Branch (MTB).In order to stabilize the performance during training so as to facilitate the integration with other branches, we constructed the MTB as shown in Fig. 3a.In order to improve the consistency of the convergence speed of the training parameters in each branch of Treble-Former, we add GroupNormal as a normal layer before the linear layer, which can stabilize the performance and reduce the effect of batch size on the model, and ultimately make it easier for MTB to integrate with the other branches to become a powerful network.In addition, both polyp and background features should be concerned in polyp segmentation.Therefore, we use SiLu as the activation function, which can better preserve both polyp and background features in each feature map.

Pyramid transformer branch (PTB).
In order to maintain the complementarity of the features in Fig. 1, we retain some of the structures in FCB-Former.Since the Transformer Branch in FCB-Former uses PVTv2 as the backbone, and PVTv2 uses convolutional layers instead of the linear layers of the traditional Transformer, PVTv2 is able to capture the information of the polyp boundaries when sensing the global field of view as well as CNN.So we remove the full convolutional branch of FCB-Former and keep the Transformer Branch as the PTB in Treble-Former.

Swin transformer branch (STB).
In order to make the STB output different features from the first two branches, we adopt DoubleUNet 55 as the structure of the STB.DoubleUNet has good feature fusion capability on a network with UNet as the encoder.Since Swin Transformer 56 does not use a convolutional layer, the improvement of the extraction ability of features on the details of colon polyps can be realized by combining VGG19 with a stacked 3 × 3 convolution.Therefore, we fused the SwinUNetR 57 equipped with Swin Transformer with the UNet equipped with VGG19 for coarse and fine features by using the structure of DoubleUNet.

Multi-head control ensemble
Multi-head control ensemble (MHC Ensemble).As shown in Fig. 3b, three branches output branching features.In order to fuse the complementary branch features, the branch outputs are cascaded step by step through the RB module and LB module of FCB-Former.In addition, multi-loss function supervises and multi-head output Ensemble are also performed on the results of multi-head output, and this whole process is collectively called Multi-Head Control Ensemble.
Multi-loss function supervises.In the problem of binary classification of polyp and background, we expect the deep model to learn the polyp and background features while paying more attention to the representative www.nature.com/scientificreports/features of the polyp.Therefore, we then chose the combination of the cross entropy loss function (CE loss), which pays attention to the background and polyps, and the Dice loss function, which pays attention to the polyps only, as the loss function supervised training for each output header.Multi-head output Ensemble.In order to complement the output results in the multi-head output, we first empirically categorize the five multi-head outputs in Fig. 3b into three categories according to performance from highest to lowest: ( α ) MTB concatenated PTB concatenated STB's output head; ( β ) MTB's output header and the output header after PTB concatenate STB; and ( γ ) the output header of PTB and STB.In order to take into account, the performance differences of each output head in a specific case, when integrating the output results of multiple output heads, the definition of weights will be based on the specific division of weights according to the mDice coefficients, the evaluation indexes of each output head on the validation set.
where J ∈ {α, (α + β), (α + β + γ )} .d denotes the evaluation index mDice corresponding to the corresponding output head.Output head i denotes the output result of the output head.The mDice coefficients corresponding to each class in J are Softmaxed and then accumulated to generate the ensemble weights W head .The weights are weighted and summed with the outputs of the header Output head i to generate the integrated prediction result Output Ens .

SDBH-PSO
Since the global optimal solution before iteration in the real-time ensemble task is not necessarily the global optimal solution in this epochs, there is a need to prevent the optimal particle from being a local optimal solution.Therefore, it is necessary to initialize the particles that are too close to the optimal particles when the whole is too aggregated.The degree of proximity of each particle to the optimal particle is defined by Pearson's correlation coefficient 58 , and the overall aggregation of particles is defined by Renxoa Wan's aggregation coefficient C(k) 59 .
where C(k) is the aggregation degree of the particle population in the kth generation and n is the population size.Since the iterations are all relatively homogeneous and may lead to excessive oscillations in particle aggregation in later iterations, an adaptive function θ(k) controlled by a nonlinear function is added to assess the degree of particle overlap 59 .Whether the particles have a tendency to fall into local optimum is judged by , where H is a constant used for adjustment.Through many experiments, it is found that SDBH-PSO has the best effect on weight adjustment when H is taken around 3.
Where k max is the maximum number of iterations and k is the current number of iterations.s is an exponential factor.We set s = 1.0 , max = 0.9 , min = 0.4 in our experiments, while the adjustable inertia parameter in Eqs.
(1) is also set to 0.9 − 0.5(k \ k max ) 2 with reference to the nonlinear tuning method.
The potential global optimal point is usually within a certain distance from the current optimal point, and we found that in our task, the variation of the distance between the previous generation global optimal point and the next generation is roughly concentrated in the range of [0.04, 0.23] through analysis.The strategy of RBH-PSO 60 to search for the potential global optimum is used to randomly select a point within a certain range as the location of the potential optimum x id .Compared to the RBH-PSO in which the radius ζ = 0.01 is taken as the range, the global optimum solution of the real-time ensemble is subjected to the influence of the model training and has a large variation.So, the search for potential optimal solutions needs to be expanded.Therefore, the position of the particle to be reset is placed into the black hole combined with randomizing the initial velocity to v id 0 for resetting.
where ζ is randomly derived from a uniform distribution over the interval [−ξ , ξ ] , and ξ is taken as 0.1.Rand is a random number in the range [0, 1], x id max and x id min are the upper and lower bounds of the search space, and Gaussian(µ, σ 2 ) is a Gaussian function.We set σ max = 1.0 and σ min = 0.1. (3) Similarity degree black hole PSO can be summarized simply in Algorithm 1.

SDBH-PSO ensemble
We use the ensemble weights as the positions of the particles in SDBH-PSO, and the mDice coefficients achieved by the Ensemble Learning outputs as the fitness of the particles in the validation set, and achieve the optimal allocation of the ensemble weights to the validation set through the SDBH-PSO algorithm: every ten epochs.
In addition, the initial learning rate is 0.001, and the learning rate is adjusted with the strategy that the learning rate decreases to half if the Dice coefficient has not improved for five consecutive generations on the validation set.When the learning rate of all sub-models has decreased an equal number of times, the weights of Ensemble Learning are optimized by the SDBH-PSO Ensemble algorithm.The sub-models with weights less than or equal to 0 are marked.When the sub-model has been labeled 3 times, the learning rate corresponding to the learning rate adjustment strategy is already very low, so even if we continue to train this sub-model, it will not improve much, so we choose to eliminate it.Regarding parameter configurations, the SDBH-PSO Ensemble performs five iterations for every ten epochs, utilizing 50 particles per iteration.Where the iterative process is the same.The running speed of the SDBH-PSO Ensemble, which optimizes parameters via validation sets, is contingent upon the size of this set.Specifically, for a validation set of 100 images, the iteration time per generation is approximately one minute.Conversely, if the validation set contains 61 images, the iteration time is reduced to around 35 s.
In contrast to other semantic segmentation that Ensemble Learning performs Ensemble by best sub-model, SDBH-PSO Ensemble performs real-time ensemble every ten epochs during the training process.The SDBH-PSO Ensemble's best ensemble model's checkpoint of the SDBH-PSO Ensemble is not necessarily the checkpoint of the best sub-model, we perform the final ensemble of the best ensemble model with the best sub-model, and the final ensemble is defined as follows.
where L rt is the output of the best real-time ensemble model, L sub i is the output of the best sub-model, W rt is the weight hyperparameter of the best real-time ensemble model, W rt = 0.5 , W sub i is the weight hyperparameter of each best sub-model, W sub i = 0.5 \ I , and I is the weight hyperparameter of each sub-model filtered by SDBH- PSO according to different data sets.L DET−Former is the final output of SDBH-PSO Ensemble.

Experiments Dataset
The following datasets are used in this paper: the Kvasir 61 , CVC-ClinicDB 62 , CVC-ColonDB 63 , ETIS-Larib-PolypDB 1 and PolypGen 64 .The PolypGen comes from 6 unique centers suitable for Generalisation testing compared to other datasets.The information of the datasets is shown in Table 1.Due to the different image sizes of different datasets, we scale all the sizes to 352 × 352 and set the batch size to 4. In this paper, we combine ESFPNet, SS-Former, and an analytical paper illustrating the effect of polyp segmentation dataset enhancement on segmentation 66 , and choose random flip, scale, rotate, as well as random expansion and erosion as the data augmentation operations.

Evaluation metrics
Almost all of the colon polyp segmentation papers adopt the mDice coefficient and the mIoU coefficient as the evaluation performance metrics to measure segmentation accuracy.Furthermore, we choose the 95th percentile of the asymmetric Hausdorff distance (HD95) as a performance metric for the boundary of interest.mDice, mIoU and HD95 are calculated using the following formulae: (11) Table 1.The most commonly used public dataset for polyp segmentation.where n ii denotes the number of real numbers and is predicted to be j and k is the category of polyp and back- ground (polyp abbreviated as P and background abbreviated as B).n ii is the number of correctly predicted values, and n ij and n ji denote the false positives and false negatives respectively.The one-way Hausdorff distances d(X, Y) measure how far the predicted results are from the actual results and d(Y, X) as well as vice versa.
Regarding the evaluation of the success of polyp categorization without calculating the background, we choose Dice, which is formulated as follows:

Compare experiment
In the compare experiment of DET-Former, we use UNet, UperNet and DoubleUNet as the base networks and SS-Former, FCB-Former, ESFPNet, HarDNet-DFUS 65 amd Nanni's Ens (Nanni et al 67 .proposed Ens1) as the comparison models.Experiments were conducted on five datasets: Kvasir, CVC-ClinicDB, CVC-ColonDB, ETIS-LaribPolypDB, and PolypGen.Each model was trained for 100 epochs, and the optimal values of the evaluation metrics were documented.The metrics of each model that differ most from DET-Former are taken for t-test statistical analysis and the p-value is generated.The results of tests using different datasets or data sources were more closely aligned with clinical scenarios and were selected to generate visual segmentation maps.
An article on polyp segmentation pointed out that it is difficult for a single network to make accurate predictions in many situations 20 .As shown in Table 2, excluding DET-Former and Nanni's Ens, no single network consistently emerged as optimal across different datasets, reinforcing the challenge of achieving robust performance in colon polyp segmentation when faced with dataset variability.The models' learning abilities were evaluated by training and testing them on identical datasets.In experiments where Kvasir and CVC-ClinicDB were used for training and testing, the performance metrics of DET-Former exceeded those of the comparator models, highlighting its superior learning capabilities.However, the results of statistical analyses show that DET-Former cannot significantly outperform some networks in terms of learning ability.DET-Former and Nanni's Ens outperformed individual networks regarding Dice, mDice and mIoU metrics.These results suggest that the strategy of multi-model ensemble is expected to solve the problem of unstable learning ability of a single network on different data.
As shown in Table 3, DET-Former's evaluation metrics -Dice, mDice and mIoU -show superiority over other models on the ETIS-LaribPolypDB and CVC-ColonDB datasets, suggesting superior generalisation ability.Statistical analysis reveals that DET-Former significantly outperforms other models on the ETIS-LaribPolypDB dataset, except FCB-Former and Nanni's Ensemble.However, this significant advantage is not evident when analysing the CVC-ColonDB dataset.Among them, CVC-ClinicDB and CVC-ColonDB were used to form CVC-EndoSceneStill 68 in the MICCAI2015 challenge 69 .The significant difference between DET-Former and the comparison model is larger in ETIS-LaribPolypDB and CVC-ColonDB.To better analyse whether the generalisation  4 and 5 shows the performance of DET-Former on the PolypGen multi-centre dataset.DET-Former shows a significant improvement over competing models in centres C1 and C4.However, its performance advantage is less pronounced in centres C2, C3, C5 and C6, where it outperforms only some models.Although DET-Former exhibits superior generalisation capabilities on the multi-centre PolypGen dataset, it does not achieve significant dominance in all centres.To further investigate the limitations of DET-Former's generalisation ability in certain centres, we analyse this in conjunction with the visual segmentation results in Fig 4 .Figure 4c shows a decrease in the segmentation accuracy of DET-Former, especially in cases where different networks produce different false-negative segmentations.This problem arises because the DET-Former ensemble has multiple sub-models, and the false negatives from these sub-models are variable, especially in complex scenarios such as www.nature.com/scientificreports/ the independent distribution of multiple polyps.The complexity of these divergent false-negative segmentations poses a significant challenge for ensemble learning in colon polyp segmentation.Conversely, false-positive segmentations are less frequent and tend to occur sporadically across models, as shown in Fig. 4a, b.DET-Former is an ensemble learning structure that can optimise the false-positive results of individual false-positive segmentation models through multiple sub-models.Thus, ensemble learning has advantages in false-positive segmentation.
In the future, more effective balancing of false-negative and false-positive results in ensemble learning needs to be achieved to address the problem of false negatives in colon polyp segmentation.

Model ensemble experiment
In the model ensemble experiments, the optimal sub-model of the previous compare experiments of DET-Former on Kvasir and CVC-ClinicDB datasets is chosen as the sub-model of the model ensemble experiments.Then to measure the effectiveness of the improvement, we choose the RBH-PSO algorithm and CSPSO algorithm, which are the closest to SDBH-PSO, as well as the classical PSO algorithm and weight averaging as the BASELINE algorithm to adjust the weights of the ensemble model.The weight optimization results are shown in Table 6.
As shown in Table 6, under the CVC-ClinicDB data, the results of the outputs of various strategies are basically the same, and it can be seen that the method of improving the ensemble effect through weight optimization is not applicable to all cases.Even so, by comparing Table 2, it can be seen that compared with single network segmentation, the ensemble learning improves the segmentation accuracy greatly.As shown in Table 7, It is worth noting that the superiority of PSO over RBH-PSO and CSPSO under the Kvasir dataset also indicates that not all of the proposed improved algorithms based on the PSO algorithm are well suited for the ensemble task of the colon polyp segmentation network.While our ensemble model does not demonstrate statistically significant superiority in performance compared to the comparison method, the ensemble model of our method eliminates  www.nature.com/scientificreports/ the sub-models and improves the performance instead of degrading it.Despite utilizing only five-sixths of the model usage compared to the comparative methods, our method maintains performance levels.This suggests that the proposed SDBH-PSO Ensemble based on the polyp segmentation task is better than PSO weight optimization with average weights, which verifies that our improvement is suitable for this task.
To further explore the effectiveness of the sub-modeling strategy of SDBH-PSO Ensemble eliminated submodels, we engage the eliminated sub-models in real-time ensemble, and their ensemble weights computed by SDBH-PSO for every ten epochs are shown in Fig. 5.
As shown in Tables 6 and 7, the 5th sub-model is eliminated on the Kvasir dataset and the 4th sub-model is eliminated on the CVC-ClinicDB dataset.As shown in Fig. 5, the sub-model eliminated on the Kvasir dataset is eliminated by the SDBH-PSO Ensemble strategy at epoch 60.The sub-model eliminated on the CVC-ClinicDB dataset is eliminated at epoch 70.On the Kvasir dataset, SDBH-PSO Ensemble improved performance by filtering out models that were not suitable for ensemble.On the CVC-ClinicDB dataset, the elimination of the submodels filtered out by the SDBH-PSO Ensemble does not improve the performance, but also does not degrade the overall performance.
The experiments verify the ability of SDBH-PSO Ensemble to select sub-models and the effectiveness of submodel selection by eliminating sub-model strategy.A review article pointed out that model selection is a major challenge for ensemble learning 30 .It is believed that the ensemble method is not only applicable to colon polyp segmentation, but also can realize adaptive sub-model selection for different datasets by pairing with suitable sub-models in other tasks.

Feature fusion experiments
In the feature fusion experiments, since the ability of feature extraction and fusion can be better demonstrated on datasets that have never been involved in training, we train and validate on Kvasir and CVC-ClinicDB datasets and test on CVC-ColonDB and ETIS-LaribPolypDB datasets, and the results of the tests are shown in Fig. 6 and Table 8.
As shown in Table 8, the outputs of STB, PTB and MTB after fusion are better for STB+PTB and STB+PTB+MTB than STB, PTB and MTB before fusion, and the segmentation performance is further improved after integration.As shown in Fig. 6, the visualization of the features by heat map shows that the features extracted from different branches are quite different, and along with the feature fusion, the output results appear to be improved accordingly.Our ensemble strategy successfully compensates for the different branch segmentation defects.In this case, Treble-Former is used to fuse multiple branches and ensemble multiple output heads through MHC Ensemble, so the ensemble output results are the output results of Treble-Former.
Through Fig. 6 and Table 8, it can be seen that no branch in STB, PTB and MTB can perform the segmentation ability stably, but through feature fusion, the boundary features of the polyps become more obvious, which further compensates for the deficiency of some branches after weighted ensemble.Statistical analyses reveal that the MHC Ensemble significantly surpasses the branch STB only after the fusion of multi-branch advanced features on the CVC-ColonDB dataset.However, it significantly outperforms all three branches prior to fusion on the ETIS-LaribPolypDB dataset.These findings underscore the MHC Ensemble's capacity to leverage advanced semantic features effectively.High-level semantic features are more appropriate for the model to perform better 12 .Our research confirms that this improvement extends to colon polyp segmentation.As artificial intelligence progresses, we anticipate the introduction of more sophisticated backbones and networks that will surpass the performance of current models such as PvTv2, Mix Transformer, Double UNet, and FCB-Former.The MHC www.nature.com/scientificreports/Ensemble, which performs layer-by-layer fusion of advanced semantic features on them, will continue to exist as a reference value.

Conclusion
In this study, we propose a novel Dual Ensemble System with Treble Transformer (DET-Former).The system first constructs a multi-branch ensemble network Treble-Former with three different Transformers.Then, to improve the stability under different datasets, we propose DET-Former with SDBH-PSO Ensemble structure.Among them, the Treble-Former's approach, which employs a multi-branch, layer-by-layer fusion of high-level semantic features, represents a promising direction for developing more accurate segmentation models in the future.Meanwhile, DET-Former maintains stable, high-performance segmentation relative to other networks, suggesting that ensemble learning is expected to solve the problem of unstable performance of a single network on different colon polyp datasets.In addition, experimental evidence shows that the SDBH-PSO ensemble can adaptively select sub-models during training, providing valuable insights into model selection for ensemble learning.

Figure 2 .
Figure 2. The architecture of Dual Ensemble System with Treble Transformer.

Figure 3 .
Figure 3. (a) The architecture of Mix Transformer Branch.(b) The architecture of Multi-Head Control Ensemble.

Figure 5 .
Figure 5.The green line indicates the ensemble weights of the sub-models retained during training under the SDBH-PSO calculation.The yellow line indicates that the training was stopped after setting the sub-model weights to zero, where the mean intersection and union set (mIoU) of the real-time ensemble models are shown around the corresponding points.

Figure 6 .
Figure 6.Feature heat maps of the five branches with the segmentation results of the corresponding branches.The results after multi-output ensemble by MHC Ensemble are shown as red clippings pointing to.

Table 3 .
The test results of the compare study in ETIS-LaribPolypDB and CVC-ColonDB.

Table 4 .
The test results of the compare study in polypGen.

Table 5 .
The test results of the compare study in polypGen.

Table 6 .
The results of comparison with other weight optimization algorithms in CVC-ClinicDB.

Table 7 .
The results of comparison with other weight optimization algorithms in Kvasir.

Table 8 .
The performance of different branches in Treble-Former.